<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="utf-8" />
  <title>选择您的挂号！</title>
  <meta name="description" content="app, web app, responsive, admin dashboard, admin, flat, flat ui, ui kit, off screen nav" />
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" />
  <link rel="stylesheet" href="/static/bootstrap.css" type="text/css" />
  <link rel="stylesheet" href="/static/animate.css" type="text/css" />
  <link rel="stylesheet" href="/static/font-awesome.min.css" type="text/css" />
  <link rel="stylesheet" href="/static/font.css" type="text/css" cache="false" />
  <link rel="stylesheet" href="/static/plugin.css" type="text/css" />
  <link rel="stylesheet" href="/static/app.css" type="text/css" />
 <!--[if lt IE 9]>
    <script src="js/ie/respond.min.js" cache="false"></script>
    <script src="js/ie/html5.js" cache="false"></script>
    <script src="js/ie/fix.js" cache="false"></script>
  <![endif]-->
  <style> 
    .div-a{ float:left;width:49%;height: 215px;border:NONE} 
    </style> 
  <style type="text/css">
    #date{background:#6ed4f4;border:none}
  </style>
  <style type="text/css">
    #Register{background:#15fc5a;border:none;width: 80%;height: 80%;}
    </style>
</head>
<body>
  <section class="hbox stretch">
    <!-- .aside -->
    <aside class="bg-info aside-md" id="nav" >
      <section class="vbox">
        <header class="nav-bar dker">
          <a class="btn btn-link visible-xs" data-toggle="class:nav-off-screen" data-target="#nav">
            <i class="fa fa-bars"></i>
          </a>
          <a href="#" class="nav-brand" data-toggle="fullscreen">请选择挂号时间</a>
          <a class="btn btn-link visible-xs" data-toggle="class:show" data-target=".nav-user">
            <i class="fa fa-comment-o"></i>
          </a>
        </header>
        <section>
          <div class="lt nav-user hidden-xs pos-rlt">            
            就诊人:{{name}}<br>
            身份证号:{{id}}<br>
            手机号:{{contact}}<br><br>
            您当前所在的科室：{{room}}
          <nav class="nav-primary hidden-xs">
            <ul class="nav">

              <li><form action="#" method="POST">
            {% csrf_token %}  <!-- 改行代码为添加部分   -->
                <span><button name="date" value="1"  style="width: 275px; height: 50px;font-size:20px;" type="submit" id="date" target="iframename" class="button button--aylen">{{t2}}</button></span>
              </form>
              </li>              
              <li><form action="#" method="POST">
                {% csrf_token %}
                <span><button name="date" value="2"  style="width: 275px; height: 50px;font-size:20px;" type="submit"  id="date" target="iframename" class="button button--aylen">{{t3}}</button></span>
                </form>
              </li>
              <li><form action="#" method="POST">
                {% csrf_token %}
                <span><button name="date" value="3"  style="width: 275px; height: 50px;font-size:20px;" type="submit"  id="date" target="iframename" class="button button--aylen">{{t4}}</button></span>
                </form>
              </li>
              <li><form action="#" method="POST">
                {% csrf_token %}
                <span><button name="date" value="4"  style="width: 275px; height: 50px;font-size:20px;" type="submit"  id="date" target="iframename" class="button button--aylen">{{t5}}</button></span>
                </form>
              </li>
              <li><form action="#" method="POST">
                {% csrf_token %}
                <span><button name="date" value="5"  style="width: 275px; height: 50px;font-size:20px;" type="submit"  id="date" target="iframename" class="button button--aylen">{{t6}}</button></span>
                </form>
              </li>
              <li><form action="#" method="POST">
                {% csrf_token %}
                <span><button name="date" value="6"  style="width: 275px; height: 50px;font-size:20px;" type="submit"  id="date" target="iframename" class="button button--aylen">{{t7}}</button></span>
                </form>
              </li>
              <li><form action="#" method="POST">
                {% csrf_token %}
                <span><button name="date" value="7"  style="width: 275px; height: 50px;font-size:20px;" type="submit"  id="date" target="iframename" class="button button--aylen">{{t8}}</button></span>
                </form>
              </li>
            </ul>
          </nav>
          <!-- note -->
          
          <!-- / note -->
        </section>
        
      </section>
    </aside>
    <!-- /.aside -->
    <!-- .vbox -->
    <section id="content">
      {% for foo in infolist %}
      <div class="div-a" align="center">
        <!--此处用来添加模板语言实现医生按钮的数量-->
      <button id="Register" target="iframename" class="button button--aylen"><font size="5" color="green" >
        {{foo.0}}医生<br>
        {{foo.1}}门诊<!-- 普通门诊或专家门诊--><br>
        {{foo.2}}<!--上午/下午--><br>
        剩余号数：{{foo.3}}</font></button>
        <form action="#" method="POST">
          {% csrf_token %}
      <button name="挂号" value="{{foo.4}} {{foo.2}} {{foo.5}}" style="background:rgba(255, 243, 80, 0.452);border:none;height:10%;width:80%"><font color="red">点此确定挂号</font></button>
        </form>  
    </div> 
      {% endfor %}
      {% if messages %}
      <script>
          {% for msg in messages %}
              alert('{{ msg.message }}');
          {% endfor %}
      </script>
      {% endif %}
    </section>
    <!-- /.vbox -->    
  </section>
</body>
</html>